/*
 * Position.h
 *
 *  Created on: 5 nov. 2008
 *      Author: Administrateur
 */

#ifndef POSITION_H_
#define POSITION_H_

class Position {
public:
	/**
	 * Constructor of a position
	 */
	Position(int const& _x, int const& _y): x(_x), y(_y) {}

	/**
	 * Use to compare the position of the instance with another
	 *
	 * @param p Another position
	 *
	 * @return true if the two positions are equal. False otherwise.
	 */
	bool isEqual(Position const& p) const;

	/**
	 * Use to compare the position of the instance with x,y
	 *
	 * @param _x Position X of the compared position
	 * @param _y Position Y of the compared position
	 *
	 * @return true if the current position is equal to x,y. False otherwise.
	 */
	bool isEqual(int const& _x, int const& _y) const;

	/**
	 * Set a new coordinates
	 *
	 * @param _x new coordinate X
	 * @param _y new coordinate Y
	 *
	 */
	void position(int const& _x, int const& _y);

	/**
	 * Get the coordinate X
	 *
	 * @return coordinate X
	 */
	int const& X() const;

	/**
	 * Get the coordinate Y
	 *
	 * @return coordinate Y
	 */
	int const& Y() const;

private:
	int x,y;
};

#endif /* POSITION_H_ */
